﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Hello.Models;

namespace Hello.Controllers
{
    public class CalcController : Controller
    {
        //
        // GET: /Calc/

        Calculator mCalculator = new Calculator(); 

        public string Calculate(string number1, string operation, string number2)
        {
            double x = double.Parse(number1);
            double y = double.Parse(number2);
            char operation1 = char.Parse(operation);
            return mCalculator.Handle(x, operation1, y);
        }

        public string Index()
        {
            return "This is calculator. Believe me!";
        }

    }
}
